import { configureStore } from '@reduxjs/toolkit'
import counterReducer from './modules/counterStore'
import userStore from './modules/userStore'
const store = configureStore({
  reducer: {
    counter: counterReducer,
    user: userStore,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      //关闭redux序列化检测
      serializableCheck: false,
    }),
})
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch
export default store
